package com.heima.day531_字符串;

import java.util.Scanner;

public class char2 {
    public static void main(String[] args) {
        //键盘录入一个字符串，用Scanner实现
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入");
        String s=sc.nextLine();
    //2.将字符串拆分为字符数组
        //"hello" ---'h'....
        char[]chars=s.toCharArray();

        for (int i=0; i<chars.length;i++){
            System.out.println(chars[i]);
        }
    }
}
